3D ImageFlow Gallery for Flash Support Product Page

This topic was archived

Jukebox Source Code Help; linking to the mp3 file for downloading?

Asked 18 May 2009 22:31:40
1
has this question
18 May 2009 22:31:40 Troy Julius posted:
Can anyone help? Everything is working great, but I would like to allow someone to download the song as well. Does anyone already have this code, it would basically say, "DOWNLOAD THE SONG" the hyperlink code would point to URL for the song on the server.

Here's the code I currently have, which is working but I would like to add this option;

//declaration of the gallery
var my_jukebox:com.flzone.imageflow.Gallery;
//add images and mp3's to the gallery
my_jukebox.addItem({url:"images/1.png", mp3:"mp3/song1.mp3", description:"If I Can't Have You (Count Da Money Remix)..."});
my_jukebox.addItem({url:"images/2.png", mp3:"mp3/song2.mp3", description:"Little Bit (Helping Hands Mix) Lykke Li..."});
my_jukebox.addItem({url:"images/3.png", mp3:"mp3/song3.mp3", description:"Feel The Drive - Doctor's Cat..."});
my_jukebox.addItem({url:"images/4.png", mp3:"mp3/song4.mp3", description:"Just Dance (Trevor Simpson Mix) Lady GaGa..."});
my_jukebox.addItem({url:"images/5.png", mp3:"mp3/song5.mp3", description:"Set Your Heart (Pink Noise Remix) Cyndi Lauper..."});
my_jukebox.addItem({url:"images/6.png", mp3:"mp3/song6.mp3", description:"Bleeding Love (Moto Blanco Mix) Leona Lewis..."});
my_jukebox.addItem({url:"images/7.png", mp3:"mp3/song7.mp3", description:"Since U Been Gone (Jason Nevins Club Mix) Kelly Clarkson..."});
my_jukebox.addItem({url:"images/8.png", mp3:"mp3/song8.mp3", description:"Forget Me Nots (Paul Goodyear Remix) Patrice Rushen..."});
my_jukebox.addItem({url:"images/9.png", mp3:"mp3/song9.mp3", description:"Touch It (Explicit) 4:46 Monifah..."});
my_jukebox.addItem({url:"images/10.png", mp3:"mp3/song10.mp3", description:"An Easier Affair 4:37 George Michael..."});
//create sound object
var my_music:Sound = new Sound();
my_music.loadSound(my_jukebox.selectedItem.mp3, true);
//create new listener object
var listener:Object = new Object();
//add the change event to the listener object. It will be triggered when the main gallery image is changed
listener.change = function(evt_obj:Object) {
my_music.loadSound(my_jukebox.selectedItem.mp3, true);
};
my_jukebox.addEventListener("change", listener);
//Set the focus to the gallery
my_jukebox.setFocus();

Edited by - Troy Julius on 18 May 2009  22:35:00

Replies

Replied 21 May 2009 02:04:05
21 May 2009 02:04:05 Troy Julius replied:
Wow, sorry I made this sound a little confusing, basically I just want to be able to click on the song description and download the song, so the description will be a hyperlink to the song []

Edited by - Troy Julius on 21 May 2009  02:08:21
Replied 21 May 2009 17:50:12
21 May 2009 17:50:12 Miroslav Zografski replied:
Hi Troy,

You can have a html link tag in your description. try this way.

Regards,
Replied 21 May 2009 20:41:05
21 May 2009 20:41:05 Troy Julius replied:
Great, I will give this a try. Would you know how to add the text "DOWNLOAD SONG" and have that DOWNLOAD text be the link to the song, without showing www.domain.com/mp3/song1.mp3 ?

Edited by - Troy Julius on 21 May 2009  23:07:21
Replied 22 May 2009 11:30:26
22 May 2009 11:30:26 Miroslav Zografski replied:
Hi Troy,

If I recall correctly the link destination will not be displayed.

Regards,
Replied 22 May 2009 21:44:13
22 May 2009 21:44:13 Troy Julius replied:
Hey if anyone is reading this who might have the actual code, please reply. [^]

Reply to this topic